{include 'header.tpl'}
<style>
    .swiper-slide img{ width: 100%; }
    .swiper-slide {
        text-align: center;
        font-size: 18px;
        background: #fff;
        /* Center slide text vertically */
        display: -webkit-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
    .swiper-pagination-bullet-active{ background: #ff2d47; }
</style>
<div class="contant">
    {if $store_close_words}
        <div class="notice" style="color: red;">
            {$store_close_words}
        </div>
    {/if}
    <div class="swiper-container">
        <div class="swiper-wrapper">
            {foreach from=$banner_list item=item name=foo}
                <div class="swiper-slide"><a href="{$item.j_url|default:'javascript:;'}"><img src="{$item.url}" style="width: 100%;"></a></div>
            {/foreach}
        </div>
        <div class="swiper-pagination"></div>
        <!-- Add Arrows -->
    </div>

    <div class="nav cf">
        <ul>
            {foreach from=$cate item=item name=foo key=key}
                <li><a href="#content{$key}"><span><img src="{$item.icon}"></span><span>{$item.name}</span></a></li>
            {/foreach}
        </ul>
    </div>

    <div class="goods">
        {foreach from=$cate item=val name=foo key=key}
            <div class="mall_prd" id="content{$key}">
                <div class="mall_prd_title cf">
                    <h5><em><img src="/mall2/images/recom.png"></em>{$val.name}</h5>
                </div>
                <ul class="cf">
                    {foreach from=$val['goods_list'] item=item}
                        <li>
                            <div class="mall_prd_item">
                                <div class="mall_prd_pic"><a  href="/index/goodDetail?id={$item.auto_id}"><img src="{Service_Attach::getInstance()->getThumbUrl($item.img2, 350, 350)}"/></a></div>
                                <div class="mall_prd_tlt"><a  href="/index/goodDetail?id={$item.auto_id}">{$item.title}</a></div>
                                <div class="mall_pro_yj">
                                    <span class="pro_rs"><em>￥{$item.price_new}</em></span>
                                    <span class="pro_yj">
                                        <div class="add_gou" data-count="{$item.productList|count}"
                                              data-cover="{Service_Attach::getInstance()->getThumbUrl($item.img2, 80, 80)}"
                                             data-cs_num="{$item.cs_num}" data-pid="{$item.pid}" data-title="{{$item.title}}"
                                             data-product='{$item.productList|json_encode}'>购买</div>
                                    </span>
                                </div>
                            </div>
                        </li>
                    {/foreach}
                </ul>
            </div>
        {/foreach}
    </div>

    <div class="detail_menu cf" style="margin-top: 10px;">
        <ul>
            <li><a href="/">店铺主页</a></li>
            <li><a href="/user/index">我的订单</a></li>
            <li><a href="/store/list">线下门店</a></li>
        </ul>
    </div>
</div>



{include 'bottom_cart.tpl'}

{include 'cart.tpl'}
{include 'tan.tpl'}

<script>
    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        paginationClickable: true,
        spaceBetween: 30,
        centeredSlides: true,
        autoplay: 2500,
        autoplayDisableOnInteraction: false
    });
</script>

{include 'footer.tpl'}